<?php

namespace App\Http\Requests;



class AuthRequest extends Request
{

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
//        return captcha_check($this->input('captcha'));
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'username' => 'required|max:18|min:6',
            'password' => 'min:6',
            'recommended' => 'min:6|max:6',
        ];
    }

    public function attributes()
    {
        return [
            'username' => '用户名',
            'recommended' => '推荐人编号',
            'password' => '密码',
        ];
    }
}